package com.luweijie.sh.controller;


import com.luweijie.entity.vo.Result;
import com.luweijie.sh.entity.Menu;
import com.luweijie.sh.service.impl.MenuServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 菜单表 前端控制器
 * </p>
 *
 * @author luweijie
 * @since 2020-06-11
 */
@RestController
@RequestMapping("/sh/menu")
public class MenuController {
    @Autowired
    MenuServiceImpl menuService;
    @GetMapping("/query")
    public Result<Menu> queryMenu(String role){
        List<Menu> query = menuService.query(role);
       return Result.success(query);
    }
}
